package ru.bragnikita.utils.swing.utils;

import java.awt.*;

/**
 * @author Nikita.Brazhnikov
 */
public class GuiUtils {

	public static final void centerFrame(Component c) {
		Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
		int dialogWidth = c.getWidth();
		int dialogHeigth = c.getHeight();
		c.setLocation((d.width / 2) - (dialogWidth / 2), (d.height / 2) - (dialogHeigth / 2));
	}
}
